package com.tony.reactiveStream;

import reactor.core.publisher.Flux;

import java.time.Duration;
import java.time.temporal.ChronoUnit;

/**
 * @version V1.0  </br>
 * @ClassName FluxTest </br>
 * @Description TODO  </br>
 * @Author tonywang</br>
 * @DATE 3/14/2019 5:55 PM</br>
 */
public class FluxTest {
    public static void main(String[] args){
        Flux.just("Hello", "World").subscribe(System.out::println);
        Flux.fromArray(new Integer[] {1, 2, 3}).subscribe(System.out::println);
        Flux.empty().subscribe(System.out::println);
        Flux.range(1, 10).subscribe(System.out::println);
        Flux.just("test","your", "fuck").interval(Duration.of(10, ChronoUnit.SECONDS)).subscribe(System.out::println);
    }
}
